home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
admin
/
linuxcon.000
/
linuxcon
/
linuxconf-1.6
/
dialog
/
dialog.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-07-31
|
1KB
|
63 lines
#pragma implementation
#include "diadef.h"
#include "dialog.h"
/*
Update all variables with the edition buffer.
*/
PUBLIC void DIALOG::save()
{
for (int i=0; i<getnb(); i++){
FIELD *fi = getitem(i);
if (!fi->is_readonly()) fi->save();
}
rstmodified();
}
/*
Set all variables to its original content.
*/
PUBLIC void DIALOG::restore()
{
for (int i=0; i<getnb(); i++){
FIELD *fi = getitem(i);
if (!fi->is_readonly()) fi->restore();
}
}
/*
Return != 0 if anyone field has been modified
*/
PUBLIC int DIALOG::was_modified()
{
modified = 0;
return ARRAY::was_modified();
}
PUBLIC FIELD *DIALOG::getitem(int no)
{
return (FIELD*)ARRAY::getitem(no);
}
void dialog_clear()
{
if (dialog_mode != DIALOG_HTML){
init_dialog();
attr_clear(stdscr, LINES, COLS, screen_attr);
}
}
PUBLIC FIELD_MSG::FIELD_MSG()
{
is_loaded = 0;
}
/*
Record the icon name (no extension) which describe this dialog.
This will often be a translatable name (uh ?) allowing different icons
for different culture/language/society
*/
PUBLIC void DIALOG::seticon (const char *_icon)
{
icon.setfrom (_icon);
}